We created Bayesian Logistic Regression models using the open-source rstanarm package for the statistical programming language R.
Our model analyzes the relationship between the PEDIS-system, a clinical classification to describe characteristics of Diabetic Foot Ulcers, and amputation, which results from such ulcers as a severe complication.
We used two distinct amputation definitions:
Furthermore, we scrutinized the impact of an informed prior compared to a non-informed one.
As a result, we created four distinct model.
model1 <- readRDS("models/any-amputation-non-informed.RDS") %>% pluck(4)
## Warning: namespace 'pedis' is not available and has been replaced
## by .GlobalEnv when processing object ''
color_scheme_set("viridis")
# Effect size
summary(model1) %>%
as.data.frame() %>%
as_tibble(rownames = "Predictors") %>%
select(Predictors, n_eff) %>%
slice(1:8) %>%
kable() %>%
kableExtra::kable_styling(bootstrap_options = "striped", full_width = F)
| Predictors | n_eff |
|---|---|
| (Intercept) | 26516 |
| p | 24728 |
| e_ordinal_5 | 25087 |
| d | 26378 |
| i | 28326 |
| s | 32397 |
| alter_bei_aufnahme | 28275 |
| gender | 31458 |
# MCMC trace
mcmc_trace(model1)
# Scatterplots of MCMC draws
mcmc_pairs(x = model1, pars = c("p", "e_ordinal_5", "d", "i", "s"))
# Posterior predictive check
pp_check(model1)
model1 <- readRDS("models/any-amputation-non-informed.RDS") %>% pluck(4)
## Warning: namespace 'pedis' is not available and has been replaced
## by .GlobalEnv when processing object ''
color_scheme_set("viridis")
# Effect size
summary(model1) %>%
as.data.frame() %>%
as_tibble(rownames = "Predictors") %>%
select(Predictors, n_eff) %>%
slice(1:8) %>%
kable() %>%
kableExtra::kable_styling(bootstrap_options = "striped", full_width = F)
| Predictors | n_eff |
|---|---|
| (Intercept) | 26516 |
| p | 24728 |
| e_ordinal_5 | 25087 |
| d | 26378 |
| i | 28326 |
| s | 32397 |
| alter_bei_aufnahme | 28275 |
| gender | 31458 |
# MCMC trace
mcmc_trace(model1)
# Scatterplots of MCMC draws
mcmc_pairs(x = model1, pars = c("p", "e_ordinal_5", "d", "i", "s"))
# Posterior predictive check
pp_check(model1)
model1 <- readRDS("models/any-amputation-informed.RDS") %>% pluck(4)
## Warning: namespace 'pedis' is not available and has been replaced
## by .GlobalEnv when processing object ''
color_scheme_set("viridis")
# Effect size
summary(model1) %>%
as.data.frame() %>%
as_tibble(rownames = "Predictors") %>%
select(Predictors, n_eff) %>%
slice(1:8) %>%
kable() %>%
kableExtra::kable_styling(bootstrap_options = "striped", full_width = F)
| Predictors | n_eff |
|---|---|
| (Intercept) | 25945 |
| p | 29933 |
| e_ordinal_5 | 23116 |
| d | 27226 |
| i | 26024 |
| s | 33476 |
| alter_bei_aufnahme | 28278 |
| gender | 30840 |
# MCMC trace
mcmc_trace(model1)
# Scatterplots of MCMC draws
mcmc_pairs(x = model1, pars = c("p", "e_ordinal_5", "d", "i", "s"))
# Posterior predictive check
pp_check(model1)
model1 <- readRDS("models/major-amputation-informed.RDS") %>% pluck(4)
## Warning: namespace 'pedis' is not available and has been replaced
## by .GlobalEnv when processing object ''
color_scheme_set("viridis")
# Effect size
summary(model1) %>%
as.data.frame() %>%
as_tibble(rownames = "Predictors") %>%
select(Predictors, n_eff) %>%
slice(1:8) %>%
kable() %>%
kableExtra::kable_styling(bootstrap_options = "striped", full_width = F)
| Predictors | n_eff |
|---|---|
| (Intercept) | 18853 |
| p | 28542 |
| e_ordinal_5 | 17698 |
| d | 24427 |
| i | 28594 |
| s | 31812 |
| alter_bei_aufnahme | 29640 |
| gender | 31760 |
# MCMC trace
mcmc_trace(model1)
# Scatterplots of MCMC draws
mcmc_pairs(x = model1, pars = c("p", "e_ordinal_5", "d", "i", "s"))
# Posterior predictive check
pp_check(model1)